//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Collections.Generic;
using System.Text;
using OpenLS.Core.Serialization;

namespace OpenLS.Vml.Drawing
{
    class Proxy:IOfficeXmlSerializable
    {
        private string _start;
        private string _end;
        private string idref;
        private int? connectloc;

        public void ReadXml(ReadContext context)
        {
            using (var c = context.Read("proxy"))
            {
                _start = c.GetOptionalString("start"); //\\tfb
                _end = c.GetOptionalString("end"); //\\tfb
                idref = c.GetOptionalString("idref");
                connectloc = c.GetOptionalInteger("connectloc");
            }
        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.Write("proxy"))
            {
                c.SetOptionalString("start", _start); //\\tfb
                c.SetOptionalString("end", _end); //\\tfb
                c.SetOptionalString("idref", idref);
                c.SetOptionalInteger("connectloc", connectloc);
            }
        }
    }
}
